package com.iretailer.report.dto;

import com.iretailer.report.util.TimeUtil;

import java.text.MessageFormat;
import java.time.ZonedDateTime;

/**
 * @Auther: xjw
 * @Date: 2019/6/24 0024 13:53
 * @Description:
 */
public class DwellTimeModel {

    private Long physicalZoneId;

    private String physicalZoneName;

    private String mallId;

    private String mallName;

    private String cityId;

    private ZonedDateTime zonedDateTime;

    private String dateTime;

    private int entranceCount;

    private int passCount;

    private int stayCount;

    private int secondsCount;


    public String getAll_dateTime_Group() {
        if (this.dateTime != null) {
            return MessageFormat.format("All_{0}", this.dateTime);
        } else {
            return null;
        }
    }

    public String getMall_dateTime_Group() {
        if (this.dateTime != null) {
            return MessageFormat.format("{0}_{1}", this.mallId, this.dateTime);
        } else {
            return null;
        }
    }

    public String getZone_dateTime_Group() {
        if (dateTime != null) {
            return MessageFormat.format("{0}_{1}", this.physicalZoneId, this.dateTime);
        } else {
            return null;
        }
    }

    public String getWeek_dateTime_Group() {
        if (this.dateTime != null && this.dateTime != null) {
            return MessageFormat.format("{0}_{1}", TimeUtil.getWeekOfLocalDate(TimeUtil.parse_LocalDateTime(dateTime).toLocalDate()));
        } else {
            return null;
        }
    }

    public int getEntranceCount() {
        return entranceCount;
    }

    public void setEntranceCount(int entranceCount) {
        this.entranceCount = entranceCount;
    }

    public Long getPhysicalZoneId() {
        return physicalZoneId;
    }

    public void setPhysicalZoneId(Long physicalZoneId) {
        this.physicalZoneId = physicalZoneId;
    }

    public String getPhysicalZoneName() {
        return physicalZoneName;
    }

    public void setPhysicalZoneName(String physicalZoneName) {
        this.physicalZoneName = physicalZoneName;
    }

    public String getMallId() {
        return mallId;
    }

    public void setMallId(String mallId) {
        this.mallId = mallId;
    }

    public String getMallName() {
        return mallName;
    }

    public void setMallName(String mallName) {
        this.mallName = mallName;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public ZonedDateTime getZonedDateTime() {
        return zonedDateTime;
    }

    public void setZonedDateTime(ZonedDateTime zonedDateTime) {
        this.zonedDateTime = zonedDateTime;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public int getPassCount() {
        return passCount;
    }

    public void setPassCount(int passCount) {
        this.passCount = passCount;
    }

    public int getStayCount() {
        return stayCount;
    }

    public void setStayCount(int stayCount) {
        this.stayCount = stayCount;
    }

    public int getSecondsCount() {
        return secondsCount;
    }

    public void setSecondsCount(int secondsCount) {
        this.secondsCount = secondsCount;
    }
}
